<template>
  <div>
   <button  @click="onclick">jack对rose说：{{msg}}</button>
  </div>
</template>

<script>
  export default {
    data(){
      return{
        msg:'你不知道我是谁'
      }
    },
    methods:{
     onclick(){
       //触发bus 事件
       console.log(this.$eventBus)
       this.$eventBus.$emit('listen',this.msg)
     }
    }
  }
</script>

<style lang="scss" scoped>

</style>